<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Send a cookie without urlencoding the cookie value</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.setcookie.html">setcookie</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.socket-get-status.html">socket_get_status</a></div>
 <div class="up"><a href="ref.network.html">Network 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.setrawcookie" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">setrawcookie</h1>
  <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">setrawcookie</span> &mdash; <span class="dc-title">Send a cookie without urlencoding the cookie value</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.setrawcookie-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>setrawcookie</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$expire</code><span class="initializer"> = 0</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$path</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$domain</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$secure</code><span class="initializer"> = false</span></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$httponly</code><span class="initializer"> = false</span></span>
  ]]]]]] )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>setrawcookie()</strong></span> is exactly the same as
   <span class="function"><a href="function.setcookie.html" class="function">setcookie()</a></span> except that the cookie value will not be
   automatically urlencoded when sent to the browser.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.setrawcookie-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   For parameter information, see the <span class="function"><a href="function.setcookie.html" class="function">setcookie()</a></span>
   documentation.
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.setrawcookie-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.setrawcookie-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.5.0</td>
       <td>
        A Max-Age attribute is now included in the Set-Cookie header sent to
        the client.
       </td>
      </tr>

      <tr>
       <td>5.2.0</td>
       <td>
        The <em><code class="parameter">httponly</code></em> parameter was added.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.setrawcookie-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.setcookie.html" class="function" rel="rdfs-seeAlso">setcookie()</a> - Send a cookie</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.setcookie.html">setcookie</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.socket-get-status.html">socket_get_status</a></div>
 <div class="up"><a href="ref.network.html">Network 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
